<template>
  <div class="child1">
    <h3>我是子组件1:曹植</h3>
    <p>{{_car.car}}</p>
  </div>
</template>

<script setup lang="ts">
import $bus from "@/bus";
import { onMounted, ref } from "vue";

console.log($bus);
let _car = ref({car:'Init'});
onMounted(()=>{
  $bus.on('car', (car)=>{
    _car.value = car as {car:string};
    console.log(_car);
  })
})
</script>

<style scoped>
.child1 {
  width: 300px;
  height: 300px;
  background: hotpink;
}
</style>